Repentance
[9:84]
And never shalt thou pray over any of them that has died, and never shalt thou stand by his grave: for, behold, they were bent on denying God and His Apostle, and they died in this their iniquity.


* v.84 : I.e., unless he has repented before his death. It is reported that when the life-long opponent of the Prophet and leader of the hypocrites of Medina, ‘Abd Allāh ibn Ubayy, was dying, he sent his son to the Prophet with the request that the latter give him his (the Prophet’s) shirt, so that he might be buried in it, and that the Prophet should pray over him after his death. The Prophet took this request as a sign of Ibn Ubayy’s repentance, and gave him his shirt and later led the funeral prayers over his body. When ‘Umar ibn al-Khattāb vehemently protested against this clemency towards the man whom all the believers had regarded as “God’s enemy,” the Prophet answered, “God has granted me a choice in this matter [a reference of verse 80 of this sūrah, “whether thou dost pray that they be forgiven or dost not pray...,” etc.], and so I shall pray [for him] more than seventy times.” Several variants of this Tradition are to be found in Bukhārī, Tirmidhī, Nasā’ī, Ibn Hanbal, on the authority of Ibn ‘Abbās; Bukhārī and Muslim, on the authority of Ibn ‘Umar; Muslim, on the authority of Jābir ibn ‘Abd Allāh; and in various other hadīth compilations. Since ‘Abd Allāh ibn Ubayy died some time after the Prophet’s return from Tabūk, while verse 84 – like most of this sūrah – was revealed during the campaign, it is clear that the prohibition expressed in this verse relates only (as the sequence shows) to those who “were bent on denying God and His Apostle, and [who] died in this their iniquity” – that is, to unrepentant sinners.
* Lit., “while they were iniquitous.”